/*-------------------------------------------------------------------------------
* file:     app_sleeptimer.h
* brief:    application
* copyright Copyright (C) 2020-2022 @ NanoIC
* Date:     2022-08-15
* Version:  V1.00
* Author:   JMH
*-------------------------------------------------------------------------------*/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __APP_SLEEPTIMER_H__
#define __APP_SLEEPTIMER_H__

/* Includes ------------------------------------------------------------------*/
#include "common.h"
#include <drv/iwdt.h>
#include <sys_clk.h>
#include "pin.h"
#include "wn8012_ck801.h"
#include "lpt.h"

#include "app_cfg.h"
#include "app_lowpower.h"
#include "app_timer.h"

/* Private macro-----------------------------------------------------------*/

extern volatile bool golbal_keyboard_15_s_in_sleep_flag;  //按键15秒休眠标志
extern volatile bool global_500ms_weakup_process_flag;
extern uint16_t global_keyboard_15_s_in_sleep_tick; //按键15秒休眠计时
extern uint16_t global_sleep_15_s_in_sleep_tick;  //待机15秒休眠计时
extern volatile bool golbal_sleep_15_s_in_sleep_flag;  //待机休眠标志
/*----------------------------------------------------------------------------*/
extern void app_sleep_timer_tick_0_1ms_callback(void);
extern void app_sleep_timer_init(void);

extern void app_sleep_timer_500ms_process(void);
extern void app_lowpower_15s_in_status_set(void);

void app_sleep_timer_15s_tick_reset(void);

extern void Lpt_Config(void);
extern void LPT_Stop(void);
#endif

